Skip to content

solve issue #2707 (software skinning requires mesh normals)#2708

Open
stephengold wants to merge 2 commits intomasterfrom
sgold/issue/2707
Open

solve issue #2707 (software skinning requires mesh normals)#2708
stephengold wants to merge 2 commits intomasterfrom
sgold/issue/2707

Conversation

@stephengold
Copy link
Copy Markdown
Member

This pull request adds null checks in SkinningControl.java to allow animated meshes without normals to use software skinning in the new animation system.

Animated meshes without normals are probably rare, so I didn't make any effort to optimize the loop for that case.

I tested this code on the test app from issue #2707, and it ran without crashing, so this PR should solve issue #2707.

I also tested the same app with hardware skinning preferred, and it ran without crashing, so there doesn't seem to be any corresponding issue for hardware skinning.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the copyright year and introduces null checks for the normal buffer in SkinningControl.java to prevent potential null pointer exceptions when skinning meshes without normals. A review comment suggests refining the condition for updating the normal buffer to check for the data buffer's presence instead of just the vertex buffer to avoid redundant GPU uploads.

@stephengold stephengold linked an issue Apr 13, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

software skinning requires mesh normals

1 participant